/**
 * register check
 */
function checkUsername() {
	var username = form1.username;
	var usernameInfo = document.getElementById("usernameInfo");
	if (username.value == "") {
		alert("请输入用户名");
		return false;
	} else {
		return true;
	}
}

function checkPassword() {
	var password = form1.password;
	var passwordInfo = document.getElementById("passwordInfo");
	if (password.value == "") {
		alert("请输入密码");
		return false;
	} else {
		return true;
	}
}

function checkImageCode() {
	var imageCode = form1.imageCode;
	var imageCodeInfo = document.getElementById("imageCodeInfo");
	if (imageCode.value == "") {
		alert("请输入验证码");
		return false;
	} else if (imageCode.value != "vwo7") {
		alert("验证码错误")
		return false;
	} else {
		return true;
	}
}

function check() {
	if (!checkUsername()) { //判断用户名
		return false;
	} else if (!checkPassword()) { //判断密码
		return false;
	} else if (!checkImageCode()) { //确认验证码
		return false;
	} else {
		return true;
	}
}